﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;
using canthovieclam.BL;
using canthovieclam.Core;
using canthovieclam.Models;

namespace canthovieclam.Controllers
{
    public class LayoutController : Controller
    {
        protected override void Initialize(System.Web.Routing.RequestContext requestContext)
        {
            LayoutModels data = new LayoutModels();
            var locationImpl = new LocationImpl();
            data.Locations = new SelectList(locationImpl.GetLocationModelList(), Fields.Location.LocationId,
                Fields.Location.LocationName);
            JobCatelogyImpl jobCategoryImpl = new JobCatelogyImpl();
            data.JobCategories = new SelectList(jobCategoryImpl.GetJobCategoryList(), Fields.JobCategory.JobCategoryId, 
                Fields.JobCategory.JobCategoryName);

            ViewBag.Message = "Post Your Resume Now!";
            ViewBag.UserData = data;

            Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("vi");
            Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("vi");

            base.Initialize(requestContext);
        }

    }
}
